package com.etc.dao;

import com.etc.entity.Scenic;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author Phantom Assassin
 * @Date 2019年5月1日 下午1:11:02
 */
@Repository
@Mapper
public interface ScenicMapper {

    @Insert("insert into scenic values(#{sid}, #{title}, #{grade}, #{price_min}, #{comm_cnt}," +
            "#{cityId}, #{address}, #{url}, #{imgurl})")
    int insertScenic(Scenic scenic);

    @Select("select * from scenic where cityid = #{cityId}")
    List<Scenic> getScenicBySid(Integer sid);
}
